﻿@{
    var current = ViewBag.CurrentNav as string;
}
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu" id="sidebar-menu">
            <li class="header">主菜单</li>
            @Html.Raw(ViewBag.NavBar)
            @*<li class="treeview">
                <a href="#">
                    <i class="fa fa-gears"></i> <span>基本设置</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="@Url.Action("Index","Role")"><i class="fa fa-users"></i>角色管理</a></li>
                    <li><a href="@Url.Action("Index", "User")"><i class="fa fa-user"></i>用户管理</a></li>
                    <li><a href="@Url.Action("Index", "Item")"><i class="fa fa-file-o"></i>数据字典</a></li>
                    <li><a href="@Url.Action("Index","Module")"><i class="fa  fa-list-ul"></i> 系统菜单</a></li>
                </ul>
            </li>*@
            @*<li class="treeview">
                <a href="#">
                    <i class="fa fa-desktop"></i> <span>系统安全</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="@Url.Action("Index","LogInLog")"><i class="fa fa-book"></i>系统日志</a></li>
                </ul>
            </li>*@
            @*<li><a href="../../documentation/index.html"><i class="fa fa-book"></i> <span>Documentation</span></a></li>*@
        </ul>
    </section>
    <!-- /.sidebar -->
</aside>
<script>
    var menuVal = "@current";
    if ("" != menuVal.trim() && typeof menuVal != undefined) {
        var currentMenu = document.getElementById(menuVal);
        document.getElementById("sidebar-menu").querySelectorAll("li.treeview").className = "treeview";
        document.getElementById("sidebar-menu").querySelectorAll("ul.treeview-menu>li").className = "";
        currentMenu.setAttribute("class", "treeview active");
        var parent = currentMenu.parentNode;
        if (parent) {
            currentMenu.parentNode.parentNode.setAttribute("class", "treeview active");
        }
    }
</script>


